package cacheEntity

import (
	"time"
)

type Option func(c *Client)

func OptCacheKey(key string) Option {
	return func(c *Client) {
		c.CacheKey = key
	}
}

func OptExpireAfter(duration time.Duration) Option {
	return func(c *Client) {
		c.Expire = duration
	}
}

func OptWithPolicy(p Policy) Option {
	return func(c *Client) {
		c.Policy = p
	}
}

func OptCrossPolicyDefault() Option {
	return func(c *Client) {
		c.Policy = NewCrossPolicy()
	}
}

func OptEntityQuery(entity entityQuery)Option{
	return func(c *Client) {
		c.EntityQuery = entity
	}
}

